﻿using Omniscient.Foundation.ApplicationModel.Modularity;
using Omniscient.Foundation.ApplicationModel.Presentation;

namespace Omniscient.TimeTracker.TaskBarMenu
{
    public class TaskBarMenuViewControllerExtender : IExtender<IViewControllerExtenderContract>, IViewControllerExtenderContract
    {
        #region IExtender<IViewControllerExtenderContract> Members

        public IViewControllerExtenderContract GetImplementation()
        {
            return this;
        }

        #endregion

        #region IViewControllerExtenderContract Members

        public IView GetView(IModel model)
        {
            if (model.GetType() != typeof(TaskBarMenuModel)) return null;

            TaskBarMenuView view;
            view = new TaskBarMenuView(model);

            return view;
        }

        #endregion
    }
}